package cn.com.dhee.springcloudtraining.user.feign;


import cn.com.dhee.springcloudtraining.order.api.qo.OrderQO;
import cn.com.dhee.springcloudtraining.order.api.vo.OrderVO;
import cn.com.dhee.springcloudtraining.user.fallback.OrderFeignFallback;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.cloud.openfeign.FeignClient;

import java.util.List;

/**
 * @author ralphwong
 */
@FeignClient(value="training-order",fallbackFactory= OrderFeignFallback.class)
public interface OrderFeign {
    /**
     * 订单信息
     * @param orderId
     * @return
     */
    @PostMapping(value = "/order/info")
    OrderVO info(@RequestParam(name = "orderId") String orderId);
    /**
     * 查询订单列表
     * @param qo
     * @return
     */
    @PostMapping(value = "/order/select")
    List<OrderVO> select(@RequestBody OrderQO qo)  throws InterruptedException ;
}
